package com.xuecheng.content.test;


import com.xuecheng.content.config.MinioTemplate;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;

import javax.swing.plaf.PanelUI;
import java.io.FileInputStream;

@SpringBootTest
public class MinioTest2 {

    @Autowired
    public MinioTemplate minioTemplate;

    @Test
    public void test01() throws Exception {

        FileInputStream inputStream = new FileInputStream("D:\\Snipaste_2022-12-04_16-51-05.jpg");
        String filename = "Snipaste_2022-12-04_16-51-05.jpg";
        String upload = minioTemplate.upload(inputStream, filename);
        System.out.println(upload);

    }
}